﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'GastoGet')
	BEGIN
		DROP  Procedure  GastoGet
	END
GO

CREATE PROCEDURE GastoGet 	
	(	
		@empresaId AS INT,
		@tipo AS CHAR(1) = NULL
	)	
AS
BEGIN	
	SET NOCOUNT ON
	  
	SELECT Id, Concepto, Monto, Tipo 
	FROM Lit_Gasto
	WHERE EmpresaId = @empresaId
	  AND Activo = 1	
	  AND Tipo = ISNULL(@tipo,Tipo)
	  
	SET NOCOUNT OFF
END
GO

 